<?php
namespace app\backend\controller;

use app\backend\model\AuthNode;
use app\common\model\Region;
use think\Debug;
use think\facade\Config;

class Index extends Base
{
    public function index()
    {

        $serverInfo['系统名称'] = Config::get('base.app_name');
        $serverInfo['系统版本'] = Config::get('base.app_version');
        $serverInfo['服务器时间'] = date('Y年m月d日 H时i分');
        $serverInfo['版权所有'] = Config::get('base.app_powered');
        $serverInfo['系统描述'] = Config::get('base.app_description');
        $serverInfo['技术支持'] = Config::get('base.app_support');
//        $serverInfo['技术网址'] = Config::get('base.app_support_site');
//        $serverInfo['浏览器信息'] = $this->request->header('user-agent');

        $this->assign('serverInfo', $serverInfo);
        $this->assign('count', [
            '订单数' => 11,
            '店铺数' => 33,
            '关注数' => 44,
            '公告数' => 66,
        ]);

//        $menu = AuthNode::getNodeMenuTree();
//        halt($menu);die;
        return $this->fetch();
    }
    public function region()
    {
        return Region::getListByPid(input('pid', 0));
    }
}
